package com.example.studentmanager.adapter;

import androidx.annotation.NonNull;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentStatePagerAdapter;

import java.util.List;

public class HomeViewPagerAdapter extends FragmentStatePagerAdapter {
    private List<Fragment> fragment;

    public HomeViewPagerAdapter(List<Fragment> fragment, @NonNull FragmentManager fm) {
        super(fm);
        this.fragment = fragment;
    }

    @NonNull
    @Override
    public Fragment getItem(int position) {
        return fragment.get(position);
    }

    @Override
    public int getCount() {
        return fragment.size();
    }
}
